// chrome.storage.local.get
// chrome.storage.local.set

function mySet(obj, fn) {
    for (const key in obj) {
        if (Object.hasOwnProperty.call(obj, key)) {
            localStorage.setItem(key, obj[key])
        }
    };
    fn && fn();
}

function myGet(arr, fn) {
    let obj = {};
    arr.forEach(element => {
        obj[element] = localStorage.getItem(element)
    });
    fn && fn(obj)
}

chrome.storage.local.get = myGet;
chrome.storage.local.set = mySet;